翻訳と辞書
Words near each other
・ Longen
・ Longendale Urban District
・ Longene
・ Longenecker
・ Longepierre
・ Longer
・ Longer Fuse
・ Longer Heavier Vehicle
・ Longer Views
・ Longerak
・ Longerakvatnet
・ Longerhouw
・ Longeron
・ Longes
・ Longessaigne
Longest alternating subsequence
・ Longest bar in Australia
・ Longest bridge
・ Longest climbing salamander
・ Longest common subsequence problem
・ Longest common substring problem
・ Longest Day
・ Longest Day of Nelson
・ Longest element of a Coxeter group
・ Longest English sentence
・ Longest fence in the world
・ Longest increasing subsequence
・ Longest linear sequence
・ Longest NCAA Division I football winning streaks
・ Longest Night


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Longest alternating subsequence : ウィキペディア英語版
Longest alternating subsequence
In combinatorial mathematics, probability, and computer science, in the longest alternating subsequence problem, one wants to find a subsequence of a given sequence in which the elements are in alternating order, and in which the sequence is as long as possible.
Formally, if \mathbf = \ is a sequence of distinct real numbers, then the subsequence \, \ldots, x_\} is ''alternating''〔name="Stanleybook">〕 (or ''zigzag'' or ''down-up'')if
:x_ > x_ < x_ > \cdots x_\qquad \text \qquad 1\leq i_1 < i_2 < \cdots < i_k \leq n.
Similarly, \mathbf is ''reverse alternating'' (or ''up-down'') if
:x_ < x_ > x_ < \cdots x_\qquad \text \qquad 1\leq i_1 < i_2 < \cdots < i_k \leq n.
Let _n(\mathbf) denote the length (number of terms) of the longest alternating subsequence of \mathbf. For example, if we consider some of the permutations of the integers 1,2,3,4,5, we have that
* _5(1,2,3,4,5) = 2 ; because any sequence of 2 distinct digits are (by definition) alternating. (for example 1,2 or 1,4 or 3,5)
* _5(1,5,3,2,4) = 4, because 1,5,3,4 and 1,5,2,4 and 1,3,2,4 are all alternating, and there is no alternating subsequence with more elements;
* _5(5,3,4,1,2) = 5, because 5,3,4,1,2 is itself alternating.
== Efficient algorithms ==

The longest alternating subsequence problem is solvable in time O(n), where n is the length of the original sequence.

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Longest alternating subsequence」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.